Re: bug in on_error_rollback !? - Mailing list pgsql-hackers

From Bernd Helmle
Subject Re: bug in on_error_rollback !?
Date
Msg-id 0A7E1F8ADA2DB302DC078260@[172.26.14.247]
Whole thread Raw
In response to bug in on_error_rollback !?  ("Gurjeet Singh" <singh.gurjeet@gmail.com>)
List pgsql-hackers
--On Freitag, Oktober 27, 2006 11:00:07 +0530 Gurjeet Singh 
<singh.gurjeet@gmail.com> wrote:

> I was thinking of recommending this to someone, but wanted to try it on
> my own first; good thing that I did. I think it is broken as of now.
>
> I assume that the error thrown for 'select 1', inside a transaction, with
> 'on_error_rollback on', is not supposed to raise it's head !!!
>
> Or am I missing something?
>

[...]


You have to specify the parameter in upper case:

bernd@[local]:bernd #= BEGIN;
BEGIN
bernd@[local]:bernd #*= \set ON_ERROR_ROLLBACK
bernd@[local]:bernd #*= SELECT a;
ERROR:  column "a" does not exist
LINE 1: SELECT a;              ^
bernd@[local]:bernd #*= SELECT 1;?column?
----------       1
(1 row)

--  Thanks
                   Bernd


pgsql-hackers by date:

Previous
From: "Gurjeet Singh"
Date:
Subject: bug in on_error_rollback !?
Next
From: "Albe Laurenz"
Date:
Subject: Re: Deadlock with pg_dump?